package avicit.bdp.dms.tdm.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import avicit.platform6.core.properties.PlatformConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * @金航数码科技有限责任公司
 * @作者：${tableInfo.classCreator}
 * @邮箱：${tableInfo.classMailbox}
 * @创建时间： 2023-11-14 16:03
 * @类说明：bdp_process_approve
 * @修改记录：
 */
@ApiModel(value = "ProcessApproveDTO", description = "流程审核表")
@Table(name = "bdp_process_approve")
public class ProcessApproveDTO extends BaseDTO {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @LogField
    @ApiModelProperty(value = "主键", name = "id")
    @FieldRemark(column = "id", field = "id", name = "主键")
    @javax.persistence.Id
    @Column(name = "id")
    private String id;

    /**
     * 业务ID(数据资产id、数据申请id)
     */
    @LogField
    @ApiModelProperty(value = "业务ID", name = "businessId")
    @FieldRemark(column = "business_id", field = "businessId", name = "业务ID")
    private String businessId;

    /**
     * 业务标题
     */
    @LogField
    @ApiModelProperty(value = "业务标题", name = "businessTitle")
    @FieldRemark(column = "business_title", field = "businessTitle", name = "业务标题")
    private String businessTitle;

    /**
     * 流程类型，1-资产发布，2-资产撤回，3-资产申请
     */
    @LogField
    @ApiModelProperty(value = "流程类型，1-资产发布，2-资产撤回，3-资产申请", name = "flowType")
    @FieldRemark(column = "flow_type", field = "flowType", name = "流程类型")
    private Integer flowType;

    /**
     * 编辑状态
     */
    @LogField
    @ApiModelProperty(value = "编辑状态", name = "editStatus")
    @FieldRemark(column = "edit_status", field = "editStatus", name = "编辑状态")
    private String editStatus;

    /**
     * 扩展属性
     */
    @LogField
    @ApiModelProperty(value = "扩展属性", name = "extAttr")
    @FieldRemark(column = "ext_attr", field = "extAttr", name = "扩展属性")
    private String extAttr;

    /**
     * 状态
     */
    @LogField
    @ApiModelProperty(value = "状态", name = "status")
    @FieldRemark(column = "status", field = "status", name = "状态")
    private String status;

    /**
     * 描述
     */
    @LogField
    @ApiModelProperty(value = "描述", name = "remark")
    @FieldRemark(column = "remark", field = "remark", name = "描述")
    private String remark;

    /**
     * 数据权属
     */
    @LogField
    @ApiModelProperty(value = "数据权属", name = "dataPerm")
    @FieldRemark(column = "data_perm", field = "dataPerm", name = "数据权属")
    private String dataPerm;

    /**
     * 数据来源
     */
    @LogField
    @ApiModelProperty(value = "数据来源", name = "dataOrigin")
    @FieldRemark(column = "data_origin", field = "dataOrigin", name = "数据来源")
    private String dataOrigin;

    @Transient
    private String secretLevelName;
    @Transient
    private String flowTypeName;
    @Transient
    private Integer resourceType;
    @Transient
    private String resourceTypeName;
    // 流程当前状态
    @Transient
    private String businessstate_;
    // 当前处理人
    @Transient
    private String assigneenames_;
    // 流程当前步骤
    @Transient
    private String activityalias_;
    // 流程实例ID
    @Transient
    private String dbid_;
    /**
     * 审核状态(包含退回)
     */
    @Transient
    private Integer checkerStatus;
    @Transient
    private String checkStatusName;
    @Transient
    private String bpmState;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Transient
    private Date applyTime;
    /**
     * 提交日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    @Transient
    private Date submitTime;
    /**
     * 提交人
     */
    @Transient
    private String submitPerson;
    @Transient
    private String submitPersonName;
    /**
     * 提交方
     */
    @Transient
    private String submitOrg;
    @Transient
    private String submitOrgName;
    /**
     * 资产名称
     */
    @Transient
    private String assetTitle;
    /**
     * 申请服务类型
     */
    @Transient
    private String applyServiceType;

    @Transient
    private String assetId;

    public String getAssigneenames_() {
        return assigneenames_;
    }

    public void setAssigneenames_(String assigneenames_) {
        this.assigneenames_ = assigneenames_;
    }

    public String getActivityalias_() {
        return activityalias_;
    }

    public void setActivityalias_(String activityalias_) {
        this.activityalias_ = activityalias_;
    }

    public String getSubmitOrg() {
        return submitOrg;
    }

    public void setSubmitOrg(String submitOrg) {
        this.submitOrg = submitOrg;
    }

    public String getSubmitOrgName() {
        return submitOrgName;
    }

    public void setSubmitOrgName(String submitOrgName) {
        this.submitOrgName = submitOrgName;
    }

    public String getSubmitPerson() {
        return submitPerson;
    }

    public void setSubmitPerson(String submitPerson) {
        this.submitPerson = submitPerson;
    }

    public String getSubmitPersonName() {
        return submitPersonName;
    }

    public void setSubmitPersonName(String submitPersonName) {
        this.submitPersonName = submitPersonName;
    }

    public String getDbid_() {
        return dbid_;
    }

    public void setDbid_(String dbid_) {
        this.dbid_ = dbid_;
    }

    public Date getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    public Date getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

    public String getBpmState() {
        return bpmState;
    }

    public void setBpmState(String bpmState) {
        this.bpmState = bpmState;
    }

    public Integer getCheckerStatus() {
        return checkerStatus;
    }

    public void setCheckerStatus(Integer checkerStatus) {
        this.checkerStatus = checkerStatus;
    }

    public String getCheckStatusName() {
        return checkStatusName;
    }

    public void setCheckStatusName(String checkStatusName) {
        this.checkStatusName = checkStatusName;
    }

    public String getBusinessstate_() {
        return businessstate_;
    }

    public void setBusinessstate_(String businessstate_) {
        this.businessstate_ = businessstate_;
    }

    public Integer getResourceType() {
        return resourceType;
    }

    public void setResourceType(Integer resourceType) {
        this.resourceType = resourceType;
    }

    public String getResourceTypeName() {
        return resourceTypeName;
    }

    public void setResourceTypeName(String resourceTypeName) {
        this.resourceTypeName = resourceTypeName;
    }

    public String getFlowTypeName() {
        return flowTypeName;
    }

    public void setFlowTypeName(String flowTypeName) {
        this.flowTypeName = flowTypeName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getFlowType() {
        return flowType;
    }

    public void setFlowType(Integer flowType) {
        this.flowType = flowType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getBusinessTitle() {
        return businessTitle;
    }

    public void setBusinessTitle(String businessTitle) {
        this.businessTitle = businessTitle;
    }

    public String getEditStatus() {
        return editStatus;
    }

    public void setEditStatus(String editStatus) {
        this.editStatus = editStatus;
    }

    public String getExtAttr() {
        return extAttr;
    }

    public void setExtAttr(String extAttr) {
        this.extAttr = extAttr;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDataPerm() {
        return dataPerm;
    }

    public void setDataPerm(String dataPerm) {
        this.dataPerm = dataPerm;
    }

    public String getDataOrigin() {
        return dataOrigin;
    }

    public void setDataOrigin(String dataOrigin) {
        this.dataOrigin = dataOrigin;
    }

    public String getSecretLevelName() {
        return secretLevelName;
    }

    public void setSecretLevelName(String secretLevelName) {
        this.secretLevelName = secretLevelName;
    }

    public String getAssetTitle() {
        return assetTitle;
    }

    public void setAssetTitle(String assetTitle) {
        this.assetTitle = assetTitle;
    }

    public String getApplyServiceType() {
        return applyServiceType;
    }

    public void setApplyServiceType(String applyServiceType) {
        this.applyServiceType = applyServiceType;
    }

    public String getAssetId() {
        return assetId;
    }

    public void setAssetId(String assetId) {
        this.assetId = assetId;
    }

    @Override
    public String getLogFormName() {
        if (StringUtils.isEmpty(super.logFormName)) {
            return "资产审批模块";
        } else {
            return super.logFormName;
        }
    }

    @Override
    public String getLogTitle() {
        if (StringUtils.isEmpty(super.logTitle)) {
            return "资产审批";
        } else {
            return super.logTitle;
        }
    }

    public PlatformConstant.LogType getLogType() {
        if (super.logType == null) {
            return PlatformConstant.LogType.module_operate;
        } else {
            return super.logType;
        }
    }

}